# Consider adding a network
version: '3.7'
services:
  rabbitmq:
    image: rabbitmq:latest
    restart: always
    ports:
      - 15672:15672
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  keycloak:
    image: keycloak:latest
    environment:
      DB_VENDOR: POSTGRES
      DB_ADDR: postgres
      DB_DATABASE: turtech
      DB_USER: turtech
      DB_PASSWORD: $POSTGRES_PASSWORD
      DB_SCHEMA: keycloak
      KEYCLOAK_USER: admin
      KEYCLOAK_PASSWORD: $KEYCLOAK_PASSWORD
    restart: always
    depends_on:
      - postgres
    ports:
      - 8103:8080
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  postgres:
    image: postgres:latest
    environment:
      POSTGRES_DB: turtech
      POSTGRES_USER: turtech
      POSTGRES_PASSWORD: $POSTGRES_PASSWORD
    restart: always
    ports:
      -5432:5432
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  config:
    environment:
      CONFIG_SERVICE_PASSWORD: $CONFIG_SERVICE_PASSWORD
    image: zyv42/turtech-config
    restart: always
    ports:
      - 8101:8101
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  registry:
    environment:
      CONFIG_SERVICE_PASSWORD: $CONFIG_SERVICE_PASSWORD
    image: zyv42/turtech-registry
    restart: always
    depends_on:
      - config
    ports:
      - 8102:8102
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  gateway:
    environment:
      CONFIG_SERVICE_PASSWORD: $CONFIG_SERVICE_PASSWORD
    image: zyv42/turtech-gateway
    restart: always
    depends_on:
      - config
    ports:
      - 9000:9000
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  monitoring:
    environment:
      CONFIG_SERVICE_PASSWORD: $CONFIG_SERVICE_PASSWORD
    image: zyv42/turtech-monitoring
    restart: always
    depends_on:
      - config
    ports:
      - 8104:8104
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  turbine-service-service:
    environment:
      CONFIG_SERVICE_PASSWORD: $CONFIG_SERVICE_PASSWORD
    image: zyv42/turtech-turbine-stream-service
    restart: always
    depends_on:
      - config
    ports:
      - 8105:8105
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  account-service:
    environment:
      CONFIG_SERVICE_PASSWORD: $CONFIG_SERVICE_PASSWORD
      ACCOUNT_SERVICE_PASSWORD: $ACCOUNT_SERVICE_PASSWORD
      POSTGRES_PASSWORD: $POSTGRES_PASSWORD
    image: zyv42/turtech-account-service
    restart: always
    depends_on:
      - config
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  catalog-service:
    environment:
      CONFIG_SERVICE_PASSWORD: $CONFIG_SERVICE_PASSWORD
      POSTGRES_PASSWORD: $POSTGRES_PASSWORD
    image: zyv42/turtech-catalog-service
    restart: always
    depends_on:
      - config
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  frontend-client:
    image: zyv42/turtech-frontend-client
    restart: always